import java.util.Random;

public class Java009 {
    public static void main(String []args){
        int [][] arr = {{1,2,3},{4,5,6,7},{8,9,10}};
        int randomnumber1,randomnumber2,flag;
        Random random = new Random();
        for(int i = 0;i<arr.length;i++)
        {
            for(int j = 0;j<arr[i].length;j++){
                flag = arr[i][j];
               randomnumber1=random.nextInt(arr.length);
               randomnumber2=random.nextInt(arr[randomnumber1].length);
               arr[i][j] = arr[randomnumber1][randomnumber2];
               arr[randomnumber1][randomnumber2]=flag;
            }
        }

        //下面是输出
        System.out.print("{");
        for (int i = 0; i < arr.length; i++) {
            System.out.print("{");
            for (int j = 0; j < arr[i].length; j++) {
                System.out.print(arr[i][j]);
                if (j < arr[i].length - 1) {
                    System.out.print(",");
                }
            }
            System.out.print("}");
            if (i < arr.length - 1) {
                System.out.print(",");
            }
        }
        System.out.println("}");
    }
}
